package cn.edu.ccut.refactor;

import org.eclipse.core.resources.IProject;
import org.eclipse.ltk.core.refactoring.Refactoring;
import org.eclipse.ltk.ui.refactoring.RefactoringWizard;

/**
 * 
 * @author Bai Yucheng 2008-1-21
 * 
 */
public class MoveRefactoringWizard extends RefactoringWizard {
	private IProject fCurrentProject;

	public MoveRefactoringWizard(Refactoring refactoring, int i) {
		super(refactoring, i);
		setDefaultPageTitle(Messages.getString("MoveRefactoringWizard.0"));  //$NON-NLS-1$
	}

	protected void addUserInputPages() {
		MoveInputWizardPage moveinputwizardpage = createInputPage(Messages.getString("MoveRefactoringWizard.1"), "");   //$NON-NLS-1$ //$NON-NLS-2$
		addPage(moveinputwizardpage);
	}

	protected MoveInputWizardPage createInputPage(String s, String s1) {
		return new MoveInputWizardPage(s, getCurrentProject());
	}

	public IProject getCurrentProject() {
		return fCurrentProject;
	}

	public void setCurrentProject(IProject saturnProject) {
		fCurrentProject = saturnProject;
	}

	@Override
	public boolean performFinish() {
		try {
			super.performFinish();
		} catch (Exception e) {
		}
		return true;
	}

	// @Override
	// public boolean canFinish() {
	// if(MoveInputWizardPage.flag){
	// return super.canFinish();
	// }else{
	// return false;
	// }
	// }

}
